<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BadgerDB: badgerdb::FileHeader Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BadgerDB
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacebadgerdb.html">badgerdb</a></li><li class="navelem"><a class="el" href="structbadgerdb_1_1_file_header.html">FileHeader</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structbadgerdb_1_1_file_header-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">badgerdb::FileHeader Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header metadata for files on disk which contain pages.  
 <a href="structbadgerdb_1_1_file_header.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="file_8h_source.html">file.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae1f662fea1e092100041c96be576f9d6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbadgerdb_1_1_file_header.html#ae1f662fea1e092100041c96be576f9d6">operator==</a> (const <a class="el" href="structbadgerdb_1_1_file_header.html">FileHeader</a> &amp;rhs) const</td></tr>
<tr class="separator:ae1f662fea1e092100041c96be576f9d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa1cfc5220c6795868c8301cec298c8a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbadgerdb_1_1_file_header.html#aa1cfc5220c6795868c8301cec298c8a6">num_pages</a></td></tr>
<tr class="separator:aa1cfc5220c6795868c8301cec298c8a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad006b5b9d02b8c20e7ad5226680779c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbadgerdb_1_1_file_header.html#ad006b5b9d02b8c20e7ad5226680779c6">first_used_page</a></td></tr>
<tr class="separator:ad006b5b9d02b8c20e7ad5226680779c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07ac20f98d6aced3eb5358e0d4830abc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbadgerdb_1_1_file_header.html#a07ac20f98d6aced3eb5358e0d4830abc">num_free_pages</a></td></tr>
<tr class="separator:a07ac20f98d6aced3eb5358e0d4830abc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa86917d8554a42318c795471f32ad006"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbadgerdb_1_1_file_header.html#aa86917d8554a42318c795471f32ad006">first_free_page</a></td></tr>
<tr class="separator:aa86917d8554a42318c795471f32ad006"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Header metadata for files on disk which contain pages. </p>

<p class="definition">Definition at line <a class="el" href="file_8h_source.html#l00024">24</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ae1f662fea1e092100041c96be576f9d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1f662fea1e092100041c96be576f9d6">&#9670;&nbsp;</a></span>operator==()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool badgerdb::FileHeader::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structbadgerdb_1_1_file_header.html">FileHeader</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns true if this file header is equal to the other.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rhs</td><td>Other file header to compare against. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the other header is equal to this one. </dd></dl>

<p class="definition">Definition at line <a class="el" href="file_8h_source.html#l00051">51</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                                               {</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structbadgerdb_1_1_file_header.html#aa1cfc5220c6795868c8301cec298c8a6">num_pages</a> == rhs.num_pages &amp;&amp;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <a class="code" href="structbadgerdb_1_1_file_header.html#a07ac20f98d6aced3eb5358e0d4830abc">num_free_pages</a> == rhs.num_free_pages &amp;&amp;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <a class="code" href="structbadgerdb_1_1_file_header.html#ad006b5b9d02b8c20e7ad5226680779c6">first_used_page</a> == rhs.first_used_page &amp;&amp;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <a class="code" href="structbadgerdb_1_1_file_header.html#aa86917d8554a42318c795471f32ad006">first_free_page</a> == rhs.first_free_page;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa86917d8554a42318c795471f32ad006"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa86917d8554a42318c795471f32ad006">&#9670;&nbsp;</a></span>first_free_page</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> badgerdb::FileHeader::first_free_page</td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> number of the first free (allocated but unused) page in the file. </p>

<p class="definition">Definition at line <a class="el" href="file_8h_source.html#l00043">43</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>

</div>
</div>
<a id="ad006b5b9d02b8c20e7ad5226680779c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad006b5b9d02b8c20e7ad5226680779c6">&#9670;&nbsp;</a></span>first_used_page</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> badgerdb::FileHeader::first_used_page</td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> number of the first used page in the file. </p>

<p class="definition">Definition at line <a class="el" href="file_8h_source.html#l00033">33</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>

</div>
</div>
<a id="a07ac20f98d6aced3eb5358e0d4830abc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07ac20f98d6aced3eb5358e0d4830abc">&#9670;&nbsp;</a></span>num_free_pages</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> badgerdb::FileHeader::num_free_pages</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Number of free pages (allocated but unused) in the file. </p>

<p class="definition">Definition at line <a class="el" href="file_8h_source.html#l00038">38</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>

</div>
</div>
<a id="aa1cfc5220c6795868c8301cec298c8a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1cfc5220c6795868c8301cec298c8a6">&#9670;&nbsp;</a></span>num_pages</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> badgerdb::FileHeader::num_pages</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Number of pages allocated in the file. </p>

<p class="definition">Definition at line <a class="el" href="file_8h_source.html#l00028">28</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>/home/ubuntu/study/dbmslab/lab2/BufMgr/src/<a class="el" href="file_8h_source.html">file.h</a></li>
</ul>
</div><!-- contents -->
<div class="ttc" id="astructbadgerdb_1_1_file_header_html_aa1cfc5220c6795868c8301cec298c8a6"><div class="ttname"><a href="structbadgerdb_1_1_file_header.html#aa1cfc5220c6795868c8301cec298c8a6">badgerdb::FileHeader::num_pages</a></div><div class="ttdeci">PageId num_pages</div><div class="ttdef"><b>Definition:</b> <a href="file_8h_source.html#l00028">file.h:28</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_file_header_html_a07ac20f98d6aced3eb5358e0d4830abc"><div class="ttname"><a href="structbadgerdb_1_1_file_header.html#a07ac20f98d6aced3eb5358e0d4830abc">badgerdb::FileHeader::num_free_pages</a></div><div class="ttdeci">PageId num_free_pages</div><div class="ttdef"><b>Definition:</b> <a href="file_8h_source.html#l00038">file.h:38</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_file_header_html_ad006b5b9d02b8c20e7ad5226680779c6"><div class="ttname"><a href="structbadgerdb_1_1_file_header.html#ad006b5b9d02b8c20e7ad5226680779c6">badgerdb::FileHeader::first_used_page</a></div><div class="ttdeci">PageId first_used_page</div><div class="ttdef"><b>Definition:</b> <a href="file_8h_source.html#l00033">file.h:33</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_file_header_html_aa86917d8554a42318c795471f32ad006"><div class="ttname"><a href="structbadgerdb_1_1_file_header.html#aa86917d8554a42318c795471f32ad006">badgerdb::FileHeader::first_free_page</a></div><div class="ttdeci">PageId first_free_page</div><div class="ttdef"><b>Definition:</b> <a href="file_8h_source.html#l00043">file.h:43</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
